package com.lingxu.api.ztb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lingxu.api.ztb.mapper.CPreviousApproveT3Mapper;
import com.lingxu.api.ztb.model.CPreviousApproveT3;
import com.lingxu.api.ztb.service.ICPreviousApproveT3Service;
import com.lingxu.api.ztb.model.vo.CPreviousApproveT3VO;



import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.metadata.IPage;


import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletResponse;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;

/**
 * 初步设计批复工程概算子表3 服务实现类
 *
 * @author admin
 * @since 2025-09-22
 */
@Slf4j
@Service
public class CPreviousApproveT3ServiceImpl extends ServiceImpl<CPreviousApproveT3Mapper, CPreviousApproveT3>  implements ICPreviousApproveT3Service {

    @Resource
    private CPreviousApproveT3Mapper cPreviousApproveT3Mapper;

    @Transactional(readOnly = true)
    @Override
    public IPage<CPreviousApproveT3VO> queryPageList(CPreviousApproveT3VO query) {
        Page<CPreviousApproveT3VO> page = new Page<CPreviousApproveT3VO>(query.getPageNo(), query.getPageSize());
        return cPreviousApproveT3Mapper.pageList(page,query);
    }


    @Transactional(readOnly = true)
    @Override
    public List<CPreviousApproveT3VO> list(CPreviousApproveT3VO query) {
        return cPreviousApproveT3Mapper.selectCPreviousApproveT3List(query);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void delete(Set<String> ids) {
        if (CollectionUtils.isNotEmpty(ids)) {
            cPreviousApproveT3Mapper.deleteBatchIds(ids);
        }
    }

}